class Solution(object):
    def numMovesStones(self, a, b, c):
        t = [a, b, c]
        t.sort()
        x, y, z = t[0], t[1], t[2]
        max_val = z - x - 2
        if x + 1 == y == z - 1:
            min_val = 0
        else:
            if y == x + 1 or y == z - 1:
                min_val = 1
            else:
                if y - x == 2 or z - y == 2:
                    min_val = 1
                else:
                    min_val = 2
        return [min_val, max_val]
